<template>
    <div class="codeInfo">
        <el-dialog
                v-model="dialogVisible"
                title="Tips"
                width="50%"
        >
            <pre>{{JsonData}}</pre>
        </el-dialog>
    </div>
</template>
<script lang="ts">
    import {defineComponent, ref} from 'vue';
    export default defineComponent({
        components:{},
        name: 'codeInfo',
        setup() {
            const dialogVisible = ref(false)
            const JsonData = ref([])
            const open = (json:any)=>{
                JsonData.value = json
                dialogVisible.value = true

            }
            const  options =  {
                mode: {name: "javascript", json: true},
                lineNumbers: true
            }
            return {dialogVisible,JsonData,options,open};
        },
    });
</script>
